package com.jade.store.pay.vo;

import com.jade.bss.db.IdEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * 微信支付订单
 * User: JinYa 2009_jinya@163.com
 * Date: 2016-11-2
 * Time: 14:51
 * Version : 1.0
 * Remark:
 * History:
 */
@Data
@ApiModel(value ="支付订单")
public class PayOrderVo extends IdEntity {
    public static final int TYPE_TENCENT = 1;//微信支付
    public static final int TYPE_TENCENT_SCAN = 11;//微信扫描支付
    public static final int TYPE_TENCENT_APP = 13;//微信APP支付
    public static final int TYPE_TENCENT_PULBIC = 15;//微信公众号支付
    public static final int TYPE_ALIPAY = 3;//支付二维码支付
    public static final int TYPE_ALIPAY_SCAN = 31;//支付宝扫描付款
    public static final int TYPE_ALIPAY_WAP = 33;//支付宝手机完整支付
    public static final int BISHOP_PAY = 9;//BISHOP储值卡支付
    public static final int TYPE_VIP = 9;//现金支付
    public static final int BUS_TYPE_GOODS = 1;//商品消费
    public static final int BUS_TYPE_STORER = 3;//店铺收银
    public static final int BUS_TYPE_EMPLOYEE = 5;//员工收银
    public static final int BUS_TYPE_CRM_RECHARGE = 21;//会员充值

    public static final int STATUS_INIT = 0;//待支付
    public static final int STATUS_PS = 33;//客户端密码支付
    public static final int STATUS_FAI = 79;//交易失败
    public static final int STATUS_SUC = 88;//交易成功

    @ApiModelProperty(value = "业务类型")
    private  int busType=BUS_TYPE_GOODS;//业务类型
    @ApiModelProperty(value = "交易结果")
    private  int status=STATUS_INIT;//交易结果
    @ApiModelProperty(value = "type")
    private  int type;//支付方式
    @ApiModelProperty(value = "支付编号")
    private  String payNo;//支付编号 系统支付
    @ApiModelProperty(value = "关联编号")
    private  String code;//关联编号
    @ApiModelProperty(value = "appid")
    private  String appid;//微信分配的公众账号ID（企业号corpid即为此appId）
    @ApiModelProperty(value = "mch_id")
    private  String mch_id;//微信支付分配的商户号
    @ApiModelProperty(value = "authCode")
    private  String authCode;//这个是扫码终端设备从用户手机上扫取到的支付授权号，这个号是跟用户用来支付的银行卡绑定的，有效期是1分钟
    @ApiModelProperty(value = "device_info")
    private  String device_info;//终端设备号(门店号或收银设备ID)，注意：PC网页或公众号内支付请传"WEB"
    @ApiModelProperty(value = "nonce_str")
    private  String nonce_str;//随机字符串，不长于32位。推荐随机数生成算法
    @ApiModelProperty(value = "sign")
    private  String sign;//签名，详见签名生成算法
    @ApiModelProperty(value = "body")
    private  String body;//商品简单描述，该字段须严格按照规范传递，
    @ApiModelProperty(value = "detail")
    private  String detail;//商品详细列表
    @ApiModelProperty(value = "attach")
    private  String attach;//附加数据，在查询API和支付通知中原样返回，该字段主要用于商户携带订单的自定义数据
    @ApiModelProperty(value = "out_trade_no")
    private  String out_trade_no;//商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号
    @ApiModelProperty(value = "fee_type")
    private  String fee_type;//符合ISO 4217标准的三位字母代码，默认人民币：CNY，其他值列表详见货币类型
    @ApiModelProperty(value = "total_fee")
    private  float total_fee;//订单总金额，单位为分，详见支付金额
    @ApiModelProperty(value = "spbill_create_ip")
   private  String spbill_create_ip;//APP和网页支付提交用户端ip，Native支付填调用微信支付API的机器IP。
    @ApiModelProperty(value = "时间戳")
    private  long timeStamp;//时间戳
    @ApiModelProperty(value = "time_start")
    private  String time_start;//订单生成时间，格式为yyyyMMddHHmmss，如2009年12月25日9点10分10秒表示为20091225091010。其他详见时间规则
    @ApiModelProperty(value = "time_expire")
    private  String time_expire;//订单失效时间，格式为yyyyMMddHHmmss，如2009年12月27日9点10分10秒表示为20091227091010。其他详见时间规则订单失效时间，格式为yyyyMMddHHmmss，如2009年12月27日9点10分10秒表示为20091227091010。其他详见时间规则
    @ApiModelProperty(value = "goods_tag")
    private  String goods_tag;//商品标记，代金券或立减优惠功能的参数，
    @ApiModelProperty(value = "notify_url")
    private  String notify_url;//接收微信支付异步通知回调地址，通知url必须为直接可访问的url，不能携带参数。
    @ApiModelProperty(value = "trade_type")
    private  String trade_type;//取值如下：JSAPI，NATIVE，APP，
    @ApiModelProperty(value = "product_id")
    private  String product_id;//trade_type=NATIVE，此参数必传。此id为二维码中包含的商品ID，商户自行定义。
    @ApiModelProperty(value = "limit_pay")
    private  String limit_pay;//no_credit--指定不能使用信用卡支付
    @ApiModelProperty(value = "用户在商户appid下的唯一标识")
    private  String openid;//trade_type=JSAPI，此参数必传，用户在商户appid下的唯一标识。openid如何获取，可参考【获取openid】。企业号请使用【企业号OAuth2.0接口】获取企业号内成员userid，再调用【企业号userid转openid接口】进行转换
    private  String return_code;//返回CODE
    private  String return_msg;//返回结果

    //协议层
    //协议返回的具体数据（以下字段在return_code 为SUCCESS 的时候有返回）
    private String result_code = "";
    private String err_code = "";
    private String err_code_des = "";
    //业务返回的具体数据（以下字段在return_code 和result_code 都为SUCCESS 的时候有返回）
    private String prepay_id = "";
    private String code_url = "";
    @ApiModelProperty(value = "店铺编号")
    private  long storeId;//店铺编号
    @ApiModelProperty(value = "员工编号")
    private  long employeeId;//员工编号
    @ApiModelProperty(value = "店铺名称")
    private  String storeName;//店铺名称
    @ApiModelProperty(value = "员工姓名")
    private  String employeeName;//员工姓名
    @ApiModelProperty(value = "会员编号")
    private  long crmId;//会员编号
    @ApiModelProperty(value = "会员号")
    private  String crmCode;//会员号

    private String is_subscribe = "";
    private String bank_type = "";
    private String coupon_fee = "";
    private String transaction_id = "";
    private String time_end = "";
    @ApiModelProperty(value = "买家支付宝账号")
    private String buyerLogonId;
    @ApiModelProperty(value = "买家付款的金额")
    private String buyerPayAmount;
    @ApiModelProperty(value = "买家在支付宝的用户id")
    private String buyerUserId;
    @ApiModelProperty(value = "支付宝卡余额")
    private String cardBalance;
    @ApiModelProperty(value = "本次交易支付所使用的单品券优惠的商品优惠信息")
    private String discountGoodsDetail;
    @ApiModelProperty(value = "交易支付时间")
    private Date gmtPayment;
    @ApiModelProperty(value = "交易中可给用户开具发票的金额")
    private String invoiceAmount;
    @ApiModelProperty(value = "商户订单号")
    private String outTradeNo;
    @ApiModelProperty(value = "使用积分宝付款的金额")
    private String pointAmount;
    @ApiModelProperty(value = "实收金额")
    private String receiptAmount;
    @ApiModelProperty(value = "发生支付交易的商户门店名称")
    private String aliStoreName;
    @ApiModelProperty(value = "交易金额")
    private String totalAmount;
    @ApiModelProperty(value = "支付宝交易号")
    private String tradeNo;
    private String user01 = "";
    private String user02 = "";
    public int getBusType() {
        return busType;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public void setBusType(int busType) {
        this.busType = busType;
    }

    @Transient
    private List<PayOrderDetailVo> detailList;

    public List<PayOrderDetailVo> getDetailList() {
        return detailList;
    }

    public void setDetailList(List<PayOrderDetailVo> detailList) {
        this.detailList = detailList;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getPayNo() {
        return payNo;
    }

    public void setPayNo(String payNo) {
        this.payNo = payNo;
    }

    public String getAuthCode() {
        return authCode;
    }

    public void setAuthCode(String authCode) {
        this.authCode = authCode;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getMch_id() {
        return mch_id;
    }

    public void setMch_id(String mch_id) {
        this.mch_id = mch_id;
    }

    public String getDevice_info() {
        return device_info;
    }

    public void setDevice_info(String device_info) {
        this.device_info = device_info;
    }

    public String getNonce_str() {
        return nonce_str;
    }

    public long getStoreId() {
        return storeId;
    }

    public void setStoreId(long storeId) {
        this.storeId = storeId;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public void setNonce_str(String nonce_str) {
        this.nonce_str = nonce_str;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    public String getOut_trade_no() {
        return out_trade_no;
    }

    public void setOut_trade_no(String out_trade_no) {
        this.out_trade_no = out_trade_no;
    }

    public String getFee_type() {
        return fee_type;
    }

    public void setFee_type(String fee_type) {
        this.fee_type = fee_type;
    }

    public float getTotal_fee() {
        return total_fee;
    }

    public void setTotal_fee(float total_fee) {
        this.total_fee = total_fee;
    }

    public String getSpbill_create_ip() {
        return spbill_create_ip;
    }

    public void setSpbill_create_ip(String spbill_create_ip) {
        this.spbill_create_ip = spbill_create_ip;
    }

    public long getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(long timeStamp) {
        this.timeStamp = timeStamp;
    }

    public String getTime_start() {
        return time_start;
    }

    public void setTime_start(String time_start) {
        this.time_start = time_start;
    }

    public String getTime_expire() {
        return time_expire;
    }

    public void setTime_expire(String time_expire) {
        this.time_expire = time_expire;
    }

    public String getGoods_tag() {
        return goods_tag;
    }

    public void setGoods_tag(String goods_tag) {
        this.goods_tag = goods_tag;
    }

    public String getNotify_url() {
        return notify_url;
    }

    public void setNotify_url(String notify_url) {
        this.notify_url = notify_url;
    }

    public String getTrade_type() {
        return trade_type;
    }

    public void setTrade_type(String trade_type) {
        this.trade_type = trade_type;
    }

    public String getProduct_id() {
        return product_id;
    }

    public void setProduct_id(String product_id) {
        this.product_id = product_id;
    }

    public String getLimit_pay() {
        return limit_pay;
    }

    public void setLimit_pay(String limit_pay) {
        this.limit_pay = limit_pay;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getReturn_code() {
        return return_code;
    }

    public void setReturn_code(String return_code) {
        this.return_code = return_code;
    }

    public String getReturn_msg() {
        return return_msg;
    }

    public void setReturn_msg(String return_msg) {
        this.return_msg = return_msg;
    }

    public String getResult_code() {
        return result_code;
    }

    public void setResult_code(String result_code) {
        this.result_code = result_code;
    }

    public String getErr_code() {
        return err_code;
    }

    public void setErr_code(String err_code) {
        this.err_code = err_code;
    }

    public String getErr_code_des() {
        return err_code_des;
    }

    public void setErr_code_des(String err_code_des) {
        this.err_code_des = err_code_des;
    }

    public String getPrepay_id() {
        return prepay_id;
    }

    public void setPrepay_id(String prepay_id) {
        this.prepay_id = prepay_id;
    }

    public String getCode_url() {
        return code_url;
    }

    public void setCode_url(String code_url) {
        this.code_url = code_url;
    }

    public long getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(long employeeId) {
        this.employeeId = employeeId;
    }

    public String getEmployeeName() {
        return employeeName;
    }

    public void setEmployeeName(String employeeName) {
        this.employeeName = employeeName;
    }

    public String getIs_subscribe() {
        return is_subscribe;
    }

    public void setIs_subscribe(String is_subscribe) {
        this.is_subscribe = is_subscribe;
    }

    public String getBank_type() {
        return bank_type;
    }

    public void setBank_type(String bank_type) {
        this.bank_type = bank_type;
    }

    public String getCoupon_fee() {
        return coupon_fee;
    }

    public void setCoupon_fee(String coupon_fee) {
        this.coupon_fee = coupon_fee;
    }

    public String getTransaction_id() {
        return transaction_id;
    }

    public void setTransaction_id(String transaction_id) {
        this.transaction_id = transaction_id;
    }

    public String getTime_end() {
        return time_end;
    }

    public void setTime_end(String time_end) {
        this.time_end = time_end;
    }

    public String getUser01() {
        return user01;
    }

    public void setUser01(String user01) {
        this.user01 = user01;
    }

    public String getUser02() {
        return user02;
    }

    public void setUser02(String user02) {
        this.user02 = user02;
    }

    public String getBuyerLogonId() {
        return buyerLogonId;
    }

    public void setBuyerLogonId(String buyerLogonId) {
        this.buyerLogonId = buyerLogonId;
    }

    public String getBuyerPayAmount() {
        return buyerPayAmount;
    }

    public void setBuyerPayAmount(String buyerPayAmount) {
        this.buyerPayAmount = buyerPayAmount;
    }

    public String getBuyerUserId() {
        return buyerUserId;
    }

    public void setBuyerUserId(String buyerUserId) {
        this.buyerUserId = buyerUserId;
    }

    public String getCardBalance() {
        return cardBalance;
    }

    public void setCardBalance(String cardBalance) {
        this.cardBalance = cardBalance;
    }

    public String getDiscountGoodsDetail() {
        return discountGoodsDetail;
    }

    public void setDiscountGoodsDetail(String discountGoodsDetail) {
        this.discountGoodsDetail = discountGoodsDetail;
    }

    public Date getGmtPayment() {
        return gmtPayment;
    }

    public void setGmtPayment(Date gmtPayment) {
        this.gmtPayment = gmtPayment;
    }

    public String getInvoiceAmount() {
        return invoiceAmount;
    }

    public void setInvoiceAmount(String invoiceAmount) {
        this.invoiceAmount = invoiceAmount;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public String getPointAmount() {
        return pointAmount;
    }

    public void setPointAmount(String pointAmount) {
        this.pointAmount = pointAmount;
    }

    public String getReceiptAmount() {
        return receiptAmount;
    }

    public void setReceiptAmount(String receiptAmount) {
        this.receiptAmount = receiptAmount;
    }

    public String getAliStoreName() {
        return aliStoreName;
    }

    public void setAliStoreName(String aliStoreName) {
        this.aliStoreName = aliStoreName;
    }

    public String getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(String totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public long getCrmId() {
        return crmId;
    }

    public void setCrmId(long crmId) {
        this.crmId = crmId;
    }

    public String getCrmCode() {
        return crmCode;
    }

    public void setCrmCode(String crmCode) {
        this.crmCode = crmCode;
    }
}
